<div class="layuimini-container">
    <form id="app-form" class="layui-form layuimini-form">

        <div class="layui-form-item">
            <label class="layui-form-label">拼团商品</label>
            <div class="layui-input-inline">
                <div id="goods_id"></div>
            </div>
            <div class="layui-input-inline">
                <div id="goods_cate"></div>

            </div>
            <div class="layui-input-inline" style="display: flex">
                原价：<input type="text" class="layui-input" name="y_price" placeholder="商品原价" value="{$row.y_price}" id="y_price" disabled>

            </div>
            <div class="layui-input-inline" style="display: none">
                库存：<input type="text" class="layui-input" placeholder="商品库存" id="y_stock" disabled>
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label required">封面图</label>
            <div class="layui-input-block layuimini-upload">
                <input name="logo" class="layui-input layui-col-xs6" lay-verify="required"  placeholder="请上传封面图" value="{$row.logo|default=''}">
                <div class="layuimini-upload-btn">
                    <span><a class="layui-btn" data-upload="logo" data-upload-number="one" data-upload-exts="png|jpg|ico|jpeg" data-upload-icon="image"><i class="fa fa-upload"></i> 上传</a></span>
                    <span><a class="layui-btn layui-btn-normal" id="select_logo" data-upload-select="logo" data-upload-number="one" data-upload-mimetype="image/*"><i class="fa fa-list"></i> 选择</a></span>
                </div>
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label required">支付方式</label>
            <div class="layui-input-block">
                <div id="pay_type"></div>
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">拼团库存</label>
            <div class="layui-input-block">
                <input type="text" name="stock" class="layui-input" lay-verify="required" placeholder="请输入拼团库存" value="{$row.stock|default=''}">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">拼团金额</label>
            <div class="layui-input-block">
                <input type="text" name="end_price" class="layui-input" lay-verify="required" placeholder="请输入最低拼团金额" value="{$row.end_price|default=''}">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">团长金额</label>
            <div class="layui-input-block">
                <input type="text" name="collage_money" class="layui-input" placeholder="请输入拼长金额"
                       value="{$row.collage_money}">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">拼团时间</label>
            <div class="layui-input-block">
                <input type="text" name="bargain_time" id="start_time" class="layui-input" lay-verify="required" placeholder="请输入拼团开始时间" value="{$row.bargain_time|default=''}">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">拼团人数</label>
            <div class="layui-input-block">
                <input type="text" name="number" class="layui-input" lay-verify="required" placeholder="请输入拼团人数" value="{$row.number|default=''}">
            </div>
        </div>

        <div class="layui-form-item">
            <label class="layui-form-label">拼团方式</label>
            <div class="layui-input-block">
                {foreach $getBargainTypeList as $k=>$v}
                <input type="radio" name="type" value="{$k}" title="{$v}" {in name="k" value="$row.type"}checked=""{/in}>
                {/foreach}
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">限制区域购买</label>
            <div class="layui-input-block">
                {foreach $getBargainAddressList as $k=>$v}
                <input type="radio" name="is_address" value="{$k}" title="{$v}" lay-filter="selectAddress" {in name="k" value="$row.is_address" }checked="" {/in}>
                {/foreach}
            </div>
        </div>
        <div class="setAddress {if condition='$row.is_address eq 0'}layui-hide{/if}">
            <div class="layui-form-item">
                <label class="layui-form-label">设置规则</label>
                <div class="layui-input-block">
                    {foreach $getPayTypeList as $k=>$v}
                    <input type="radio" name="address_type" value="{$k}" title="{$v}" {in name="k" value="0" }checked="" {/in}>
                    {/foreach}
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">选择地址</label>
                <div class="layui-input-inline">
                    <div id="province"></div>
                </div>
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">分享标题</label>
            <div class="layui-input-block">
                <input type="text" class="layui-input" name="share_title" value="{$row.share_title|default=''}" placeholder="请输入分享标题" lay-verify="required">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label required">分享图片</label>
            <div class="layui-input-block layuimini-upload">
                <input name="share_img" class="layui-input layui-col-xs6" lay-verify="required"  placeholder="请上传封面图" value="{$row.share_img|default=''}">
                <div class="layuimini-upload-btn">
                    <span><a class="layui-btn" data-upload="share_img" data-upload-number="one" data-upload-exts="png|jpg|ico|jpeg" data-upload-icon="image"><i class="fa fa-upload"></i> 上传</a></span>
                    <span><a class="layui-btn layui-btn-normal" id="select_share_img" data-upload-select="share_img" data-upload-number="one" data-upload-mimetype="image/*"><i class="fa fa-list"></i> 选择</a></span>
                </div>
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">分享描述</label>
            <div class="layui-input-block">
                <textarea name="share_desc" rows="5" class="layui-textarea" placeholder="请输入分享描述">{$row.describe|default=''}</textarea>
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">拼团规则</label>
            <div class="layui-input-block">
                <textarea name="rule" id="rule" cols="30" rows="10">{$row.rule|default=''}</textarea>
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">状态</label>
            <div class="layui-input-block">
                {foreach $getStatusList as $k=>$v}
                <input type="radio" name="status" value="{$k}" title="{$v}" {in name="k" value="$row.status"}checked=""{/in}>
                {/foreach}
            </div>
        </div>

        <div class="hr-line"></div>
        <div class="layui-form-item text-center">
            <button type="submit" class="layui-btn layui-btn-normal layui-btn-sm" lay-submit>确认</button>
            <button type="reset" class="layui-btn layui-btn-primary layui-btn-sm">重置</button>
        </div>

    </form>
</div>
<script type="text/javascript">
    $(document).ready(function () {
        var ue = UE.getEditor('rule');
    })
    let goods_id = "{$row.goods_id}";
    let goods_cate_id = "{$row.goods_cate}";
    let pay_type_id = "{$row.pay_type}"
    let arr_address = "{$row.address}"
</script>